<script setup>
import { artGetChannelsService } from "@/api/article";
import { ref } from "vue";
defineProps({
  modelValue: {
    type: [Number, String]
  }
})

const emit = defineEmits(['update:modelValue'])
const channelList = ref([])
const getChannelList = async () => {
  const res = await artGetChannelsService()
  channelList.value = res.data

}
getChannelList()
</script>

<template>
  <el-select :model-value="modelValue" @update:modelValue="emit('update:modelValue', $event)">
    <el-option v-for="channel in channelList" :label="channel.cateName" :value="channel.id"
      :key="channel.id"></el-option>
  </el-select>
</template>
